package cn.kinoko.model.ai.ocr.entity;

import cn.kinoko.common.base.model.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author kinoko
 * @date 2024/8/14 13:50
 */
@EqualsAndHashCode(callSuper = true)
@TableName("ocr_lr")
@Data
public class OcrLr extends BaseEntity {

    /** ocr类型 */
    @TableId(value = "ocr_type")
    private String ocrType;
    /** x轴斜率 */
    private String XSlope;
    /** x轴截距 */
    private String XIntercept;
    /** y轴斜率 */
    private String YSlope;
    /** y轴截距 */
    private String YIntercept;

    public double getXSlopeDouble() {
        return Double.parseDouble(XSlope);
    }

    public double getYSlopeDouble() {
        return Double.parseDouble(YSlope);
    }

    public double getXInterceptDouble() {
        return Double.parseDouble(XIntercept);
    }

    public double getYInterceptDouble() {
        return Double.parseDouble(YIntercept);
    }
}